Split up the FileAPI idlharness test case in a manual and an autoomated part.
diff --git a/FileAPI/idlharness.html b/FileAPI/idlharness.html index 8dbac17..db666a8 100644 --- a/FileAPI/idlharness.html +++ b/FileAPI/idlharness.html
@@ -2,7 +2,7 @@ <html> <head> <meta charset="utf-8"> - <title>File API IDL tests</title> + <title>File API automated IDL tests</title> <link rel="author" title="Intel" href="http://www.intel.com"> <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#conformance"> <script src="/resources/testharness.js"></script> @@ -11,19 +11,7 @@ <script src="/resources/idlharness.js"></script> </head> <body> - <h1>File API IDL tests</h1> - - <div> - <p>Test steps:</p> - <ol> - <li>Download <a href="support/upload.txt">upload.txt</a> to local.</li> - <li>Select the local upload.txt file to run the test.</li> - </ol> - </div> - - <form name="uploadData"> - <input type="file" id="fileChooser"> - </form> + <h1>File API automated IDL tests</h1> <div id="log"></div> @@ -108,14 +96,6 @@ attribute EventHandler onloadend; }; - [Constructor] - interface FileReaderSync { - // Synchronously return strings - ArrayBuffer readAsArrayBuffer(Blob blob); - DOMString readAsText(Blob blob, optional DOMString label); - DOMString readAsDataURL(Blob blob); - }; - partial interface URL { static DOMString? createObjectURL(Blob blob); static DOMString? createFor(Blob blob); // static DOMString? createFor()Blob blob); @@ -124,27 +104,20 @@ </pre> <script> - var fileInput; + var idl_array; setup(function() { - fileInput = document.querySelector("#fileChooser") - }, {explicit_done: true, explicit_timeout: true}); - - on_event(fileInput, "change", function(evt) { - var idl_array = new IdlArray(); + idl_array = new IdlArray(); idl_array.add_untested_idls(document.getElementById("untested_idl").textContent); idl_array.add_idls(document.getElementById("idl").textContent); - idl_array.add_objects({Blob: [new Blob(["TEST"])], - FileList: [fileInput.files], - File: [fileInput.files[0]], - FileReader: [new FileReader()], - FileReaderSync: [], - URL: []}); - idl_array.test(); - - done(); + idl_array.add_objects({ + Blob: [new Blob(["TEST"])], + FileReader: [new FileReader()] + }); }); + + idl_array.test(); </script> </body> </html>